package main.java.common.constants;
/*
 * 支付类型
 */
public enum PayType {
	
	ALI("支付宝",(short)1),WECHAT("微信",(short)2),UNION("银联",(short)3);
	
	private Short code;
	private String name;
	
	private PayType(String name, Short code) {
		this.name = name;
		this.code = code;
	}
	
	public static String getNmae(Short code , String name) {
		for(PayType c : PayType.values()) {
			if(c.getCode() == code) {
				return c.getName();
			}
		}
		return null;
	}

	public Short getCode() {
		return code;
	}

	public void setCode(Short code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
}
